<template>
  <el-breadcrumb separator="/" class="breadcrumb">
    <el-breadcrumb-item v-for="item in $route.matched" :key="item.path">
      <router-link to="/admin" v-if="item.name===undefined">首页</router-link>
      <router-link :to="item.path" v-else-if="$route.query.id===undefined">{{ item.name }}</router-link>
      <router-link :to="item.path" v-else>{{ item.name.replace('新增','修改') }}</router-link>
    </el-breadcrumb-item>
  </el-breadcrumb>
</template>
